Square root of a matrix

From HandWiki
Short description: Mathematical operation

In mathematics, the square root of a matrix extends the notion of square root from numbers to matrices. A matrix B is said to be a square root of A if the matrix product BB is equal to A.[1]

Some authors use the name square root or the notation A1/2 only for the specific case when A is positive semidefinite, to denote the unique matrix B that is positive semidefinite and such that BB = BTB = A (for real-valued matrices, where BT is the transpose of B).

Less frequently, the name square root may be used for any factorization of a positive semidefinite matrix A as BTB = A, as in the Cholesky factorization, even if BB ≠ A. This distinct meaning is discussed in Positive definite matrix § Decomposition.

Examples

In general, a matrix can have several square roots. In particular, if [math]\displaystyle{ A = B^2 }[/math] then [math]\displaystyle{ A=(-B)^2 }[/math] as well.

The 2×2 identity matrix [math]\displaystyle{ \textstyle\begin{pmatrix}1 & 0\\ 0 & 1\end{pmatrix} }[/math] has infinitely many square roots. They are given by

[math]\displaystyle{ \begin{pmatrix} \pm 1 & 0\\ 0 & \pm 1\end{pmatrix} }[/math] and [math]\displaystyle{ \begin{pmatrix} a & b\\ c & -a\end{pmatrix} }[/math]

where [math]\displaystyle{ (a, b, c) }[/math] are any numbers (real or complex) such that [math]\displaystyle{ a^2+bc=1 }[/math]. In particular if [math]\displaystyle{ (a,b,t) }[/math] is any Pythagorean triple—that is, any set of positive integers such that [math]\displaystyle{ a^2 + b^2 = t^2 }[/math], then [math]\displaystyle{ \frac{1}{t}\begin{pmatrix}a & b\\ b & -a\end{pmatrix} }[/math] is a square root matrix of [math]\displaystyle{ I }[/math] which is symmetric and has rational entries.[2] Thus

[math]\displaystyle{ \begin{pmatrix}1 & 0\\ 0 & 1\end{pmatrix}= \begin{pmatrix}0 & 1\\ 1 & 0\end{pmatrix}^2 = \begin{pmatrix}\frac{4}{5} & \frac{3}{5}\\ \frac{3}{5} & -\frac{4}{5}\end{pmatrix}^2. }[/math]

Minus identity has a square root, for example:

[math]\displaystyle{ -\begin{pmatrix}1 & 0\\ 0 & 1\end{pmatrix} = \begin{pmatrix}0 & -1\\ 1 & 0\end{pmatrix}^2, }[/math]

which can be used to represent the imaginary unit i and hence all complex numbers using 2×2 real matrices, see Matrix representation of complex numbers.

Just as with the real numbers, a real matrix may fail to have a real square root, but have a square root with complex-valued entries. Some matrices have no square root. An example is the matrix [math]\displaystyle{ \begin{pmatrix}0 & 1\\ 0 & 0\end{pmatrix}. }[/math]

While the square root of a nonnegative integer is either again an integer or an irrational number, in contrast an integer matrix can have a square root whose entries are rational, yet non-integral, as in examples above.

Positive semidefinite matrices

A symmetric real n × n matrix is called positive semidefinite if [math]\displaystyle{ x^\textsf{T} A x \geq 0 }[/math] for all [math]\displaystyle{ x \in \mathbb{R}^n }[/math] (here [math]\displaystyle{ x^\textsf{T} }[/math] denotes the transpose, changing a column vector x into a row vector). A square real matrix is positive semidefinite if and only if [math]\displaystyle{ A = B^\textsf{T} B }[/math] for some matrix B. There can be many different such matrices B. A positive semidefinite matrix A can also have many matrices B such that [math]\displaystyle{ A = B B }[/math]. However, A always has precisely one square root B that is positive semidefinite and symmetric. In particular, since B is required to be symmetric, [math]\displaystyle{ B=B^\textsf{T} }[/math], so the two conditions [math]\displaystyle{ A = B B }[/math] or [math]\displaystyle{ A = B^\textsf{T} B }[/math] are equivalent.

For complex-valued matrices, the conjugate transpose [math]\displaystyle{ B^* }[/math] is used instead and positive semidefinite matrices are Hermitian, meaning [math]\displaystyle{ B^*=B }[/math].

Theorem[3] —  Let A be a positive semidefinite and symmetric matrix (note that A can be positive semidefinite but not symmetric). Then there is exactly one positive semidefinite and symmetric matrix B such that [math]\displaystyle{ A = BB }[/math]. Note that there can be more than one non-symmetric and positive semidefinite matrix [math]\displaystyle{ B }[/math] such that [math]\displaystyle{ A = B^TB }[/math]

This unique matrix is called the principal, non-negative, or positive square root (the latter in the case of positive definite matrices).

The principal square root of a real positive semidefinite matrix is real.[3] The principal square root of a positive definite matrix is positive definite; more generally, the rank of the principal square root of A is the same as the rank of A.[3]

The operation of taking the principal square root is continuous on this set of matrices.[4] These properties are consequences of the holomorphic functional calculus applied to matrices.[5][6] The existence and uniqueness of the principal square root can be deduced directly from the Jordan normal form (see below).

Matrices with distinct eigenvalues

An n×n matrix with n distinct nonzero eigenvalues has 2n square roots. Such a matrix, A, has an eigendecomposition VDV−1 where V is the matrix whose columns are eigenvectors of A and D is the diagonal matrix whose diagonal elements are the corresponding n eigenvalues λi. Thus the square roots of A are given by VD1/2 V−1, where D1/2 is any square root matrix of D, which, for distinct eigenvalues, must be diagonal with diagonal elements equal to square roots of the diagonal elements of D; since there are two possible choices for a square root of each diagonal element of D, there are 2n choices for the matrix D1/2.

This also leads to a proof of the above observation, that a positive-definite matrix has precisely one positive-definite square root: a positive definite matrix has only positive eigenvalues, and each of these eigenvalues has only one positive square root; and since the eigenvalues of the square root matrix are the diagonal elements of D1/2, for the square root matrix to be itself positive definite necessitates the use of only the unique positive square roots of the original eigenvalues.

Solutions in closed form

If a matrix is idempotent, meaning [math]\displaystyle{ A^2 = A }[/math], then by definition one of its square roots is the matrix itself.

Diagonal and triangular matrices

If D is a diagonal n × n matrix [math]\displaystyle{ D = \operatorname{diag}(\lambda_1,\dots,\lambda_n) }[/math], then some of its square roots are diagonal matrices [math]\displaystyle{ \operatorname{diag}(\mu_1,\dots,\mu_n) }[/math], where [math]\displaystyle{ \mu_i = \pm \sqrt{\lambda_i} }[/math]. If the diagonal elements of D are real and non-negative then it is positive semidefinite, and if the square roots are taken with non-negative sign, the resulting matrix is the principal root of D. A diagonal matrix may have additional non-diagonal roots if some entries on the diagonal are equal, as exemplified by the identity matrix above.

If U is an upper triangular matrix (meaning its entries are [math]\displaystyle{ u_{i,j} = 0 }[/math] for [math]\displaystyle{ i \gt j }[/math]) and at most one of its diagonal entries is zero, then one upper triangular solution of the equation [math]\displaystyle{ B^2 = U }[/math] can be found as follows. Since the equation [math]\displaystyle{ u_{i,i} = b_{i,i}^2 }[/math] should be satisfied, let [math]\displaystyle{ b_{i,i} }[/math] be the principal square root of the complex number [math]\displaystyle{ u_{i,i} }[/math]. By the assumption [math]\displaystyle{ u_{i,i} \neq 0 }[/math], this guarantees that [math]\displaystyle{ b_{i,i} + b_{j,j} \neq 0 }[/math] for all i,j (because the principal square roots of complex numbers all lie on one half of the complex plane). From the equation

[math]\displaystyle{ u_{i,j} = b_{i,i} b_{i,j} + b_{i,i+1} b_{i+1,j} + b_{i,i+2} b_{i+2,j} + \dots + b_{i,j} b_{j,j} }[/math]

we deduce that [math]\displaystyle{ b_{i,j} }[/math] can be computed recursively for [math]\displaystyle{ j-i }[/math] increasing from 1 to n-1 as:

[math]\displaystyle{ b_{i,j} = \frac{1}{b_{i,i} + b_{j,j}}\left(u_{i,j} - b_{i,i+1} b_{i+1,j} - b_{i,i+2} b_{i+2,j} - \dots - b_{i,j-1} b_{j-1,j}\right). }[/math]

If U is upper triangular but has multiple zeroes on the diagonal, then a square root might not exist, as exemplified by [math]\displaystyle{ \left(\begin{smallmatrix}0 & 1\\ 0 & 0\end{smallmatrix}\right) }[/math]. Note the diagonal entries of a triangular matrix are precisely its eigenvalues (see Triangular matrix).

By diagonalization

An n × n matrix A is diagonalizable if there is a matrix V and a diagonal matrix D such that A = VDV−1. This happens if and only if A has n eigenvectors which constitute a basis for Cn. In this case, V can be chosen to be the matrix with the n eigenvectors as columns, and thus a square root of A is

[math]\displaystyle{ R = V S V^{-1}~, }[/math]

where S is any square root of D. Indeed,

[math]\displaystyle{ \left(V D^\frac{1}{2} V^{-1}\right)^2 = V D^\frac{1}{2} \left(V^{-1} V\right) D^\frac{1}{2} V^{-1} = V D V^{-1} = A ~. }[/math]

For example, the matrix [math]\displaystyle{ A = \left(\begin{smallmatrix} 33 & 24\\ 48 & 57\end{smallmatrix}\right) }[/math] can be diagonalized as VDV−1, where

[math]\displaystyle{ V = \begin{pmatrix} 1 & 1\\ 2 & -1\end{pmatrix} }[/math] and [math]\displaystyle{ D = \begin{pmatrix} 81 & 0\\ 0 & 9\end{pmatrix} }[/math].

D has principal square root

[math]\displaystyle{ D^\frac{1}{2} = \begin{pmatrix} 9 & 0\\ 0 & 3\end{pmatrix} }[/math],

giving the square root

[math]\displaystyle{ A^\frac{1}{2} = V D^\frac{1}{2} V^{-1} = \begin{pmatrix} 5 & 2\\ 4 & 7\end{pmatrix} }[/math].

When A is symmetric, the diagonalizing matrix V can be made an orthogonal matrix by suitably choosing the eigenvectors (see spectral theorem). Then the inverse of V is simply the transpose, so that

[math]\displaystyle{ R = V S V^\textsf{T}~. }[/math]

By Schur decomposition

Every complex-valued square matrix [math]\displaystyle{ A }[/math], regardless of diagonalizability, has a Schur decomposition given by [math]\displaystyle{ A=QUQ^* }[/math] where [math]\displaystyle{ U }[/math] is upper triangular and [math]\displaystyle{ Q }[/math] is unitary (meaning [math]\displaystyle{ Q^* = Q^{-1} }[/math]). The eigenvalues of [math]\displaystyle{ A }[/math] are exactly the diagonal entries of [math]\displaystyle{ U }[/math]; if at most one of them is zero, then the following is a square root[7]

[math]\displaystyle{ A^\frac{1}{2} = Q U^\frac{1}{2} Q^*. }[/math]

where a square root [math]\displaystyle{ U^\frac{1}{2} }[/math] of the upper triangular matrix [math]\displaystyle{ U }[/math] can be found as described above.

If [math]\displaystyle{ A }[/math] is positive definite, then the eigenvalues are all positive reals, so the chosen diagonal of [math]\displaystyle{ U^\frac{1}{2} }[/math] also consists of positive reals. Hence the eigenvalues of [math]\displaystyle{ Q U^\frac{1}{2} Q^* }[/math] are positive reals, which means the resulting matrix is the principal root of [math]\displaystyle{ A }[/math].

By Jordan decomposition

Similarly as for the Schur decomposition, every square matrix [math]\displaystyle{ A }[/math] can be decomposed as [math]\displaystyle{ A = P^{-1} J P }[/math] where P is invertible and J is in Jordan normal form.

To see that any complex matrix with positive eigenvalues has a square root of the same form, it suffices to check this for a Jordan block. Any such block has the form λ(I + N) with λ > 0 and N nilpotent. If (1 + z)1/2 = 1 + a1 z + a2 z2 + ⋯ is the binomial expansion for the square root (valid in |z| < 1), then as a formal power series its square equals 1 + z. Substituting N for z, only finitely many terms will be non-zero and S = √λ (I + a1 N + a2 N2 + ⋯) gives a square root of the Jordan block with eigenvalue √λ.

It suffices to check uniqueness for a Jordan block with λ = 1. The square constructed above has the form S = I + L where L is polynomial in N without constant term. Any other square root T with positive eigenvalues has the form T = I + M with M nilpotent, commuting with N and hence L. But then 0 = S2T2 = 2(LM)(I + (L + M)/2). Since L and M commute, the matrix L + M is nilpotent and I + (L + M)/2 is invertible with inverse given by a Neumann series. Hence L = M.

If A is a matrix with positive eigenvalues and minimal polynomial p(t), then the Jordan decomposition into generalized eigenspaces of A can be deduced from the partial fraction expansion of p(t)−1. The corresponding projections onto the generalized eigenspaces are given by real polynomials in A. On each eigenspace, A has the form λ(I + N) as above. The power series expression for the square root on the eigenspace show that the principal square root of A has the form q(A) where q(t) is a polynomial with real coefficients.

Power series

Recall the formal power series [math]\displaystyle{ (1 - z)^\frac{1}{2} = \sum_{n=0}^\infty (-1)^n \binom{1/2}{n} z^n }[/math], which converges provided [math]\displaystyle{ \|z\| \leq 1 }[/math] (since the coefficients of the power series are summable). Plugging in [math]\displaystyle{ z = I - A }[/math] into this expression yields

[math]\displaystyle{ A^\frac{1}{2} := \sum_{n=0}^\infty (-1)^n {\frac{1}{2} \choose n} (I - A)^n }[/math]

provided that [math]\displaystyle{ \limsup_n\|(I - A)^n\|^\frac{1}{n} \lt 1 }[/math]. By virtue of Gelfand formula, that condition is equivalent to the requirement that the spectrum of [math]\displaystyle{ A }[/math] is contained within the disk [math]\displaystyle{ D(1,1) \subseteq \mathbb{C} }[/math]. This method of defining or computing [math]\displaystyle{ A^\frac{1}{2} }[/math] is especially useful in the case where [math]\displaystyle{ A }[/math] is positive semi-definite. In that case, we have [math]\displaystyle{ \left\|I - \frac{A}{\|A\|}\right\| \leq 1 }[/math] and therefore [math]\displaystyle{ \left\|\left(I - \frac{A}{\|A\|}\right)^n\right\| \leq \left\|I - \frac{A}{\|A\|}\right\|^n \leq 1 }[/math], so that the expression [math]\displaystyle{ \|A\|^\frac{1}{2} = \left(\sum_{n=0}^\infty (-1)^n \binom{1/2}{n} \left(I - \frac{A}{\|A\|}\right)^n\right) }[/math] defines a square root of [math]\displaystyle{ A }[/math] which moreover turns out to be the unique positive semi-definite root. This method remains valid to define square roots of operators on infinite-dimensional Banach or Hilbert spaces or certain elements of (C*) Banach algebras.

Iterative solutions

By Denman–Beavers iteration

Another way to find the square root of an n × n matrix A is the Denman–Beavers square root iteration.[8]

Let Y0 = A and Z0 = I, where I is the n × n identity matrix. The iteration is defined by

[math]\displaystyle{ \begin{align} Y_{k+1} &= \frac{1}{2} \left(Y_k + Z_k^{-1}\right), \\ Z_{k+1} &= \frac{1}{2} \left(Z_k + Y_k^{-1}\right). \end{align} }[/math]

As this uses a pair of sequences of matrix inverses whose later elements change comparatively little, only the first elements have a high computational cost since the remainder can be computed from earlier elements with only a few passes of a variant of Newton's method for computing inverses,

[math]\displaystyle{ X_{n+1} = 2X_n - X_n B X_n. }[/math]

With this, for later values of k one would set [math]\displaystyle{ X_0 = Z_{k-1}^{-1} }[/math] and [math]\displaystyle{ B = Z_k, }[/math] and then use [math]\displaystyle{ Z_k^{-1} = X_n }[/math] for some small [math]\displaystyle{ n }[/math] (perhaps just 1), and similarly for [math]\displaystyle{ Y_k^{-1}. }[/math]

Convergence is not guaranteed, even for matrices that do have square roots, but if the process converges, the matrix [math]\displaystyle{ Y_k }[/math] converges quadratically to a square root A1/2, while [math]\displaystyle{ Z_k }[/math] converges to its inverse, A−1/2.

By the Babylonian method

Yet another iterative method is obtained by taking the well-known formula of the Babylonian method for computing the square root of a real number, and applying it to matrices. Let X0 = I, where I is the identity matrix. The iteration is defined by

[math]\displaystyle{ X_{k+1} = \frac{1}{2} \left(X_k + A X_k^{-1}\right)\,. }[/math]

Again, convergence is not guaranteed, but if the process converges, the matrix [math]\displaystyle{ X_k }[/math] converges quadratically to a square root A1/2. Compared to Denman–Beavers iteration, an advantage of the Babylonian method is that only one matrix inverse need be computed per iteration step. On the other hand, as Denman–Beavers iteration uses a pair of sequences of matrix inverses whose later elements change comparatively little, only the first elements have a high computational cost since the remainder can be computed from earlier elements with only a few passes of a variant of Newton's method for computing inverses (see Denman–Beavers iteration above); of course, the same approach can be used to get the single sequence of inverses needed for the Babylonian method. However, unlike Denman–Beavers iteration, the Babylonian method is numerically unstable and more likely to fail to converge.[1]

The Babylonian method follows from Newton's method for the equation [math]\displaystyle{ X^2-A=0 }[/math] and using [math]\displaystyle{ AX_k=X_k A }[/math] for all [math]\displaystyle{ k. }[/math][9]

Square roots of positive operators

In linear algebra and operator theory, given a bounded positive semidefinite operator (a non-negative operator) T on a complex Hilbert space, B is a square root of T if T = B* B, where B* denotes the Hermitian adjoint of B.[citation needed] According to the spectral theorem, the continuous functional calculus can be applied to obtain an operator T1/2 such that T1/2 is itself positive and (T1/2)2 = T. The operator T1/2 is the unique non-negative square root of T.[citation needed]

A bounded non-negative operator on a complex Hilbert space is self adjoint by definition. So T = (T1/2)* T1/2. Conversely, it is trivially true that every operator of the form B* B is non-negative. Therefore, an operator T is non-negative if and only if T = B* B for some B (equivalently, T = CC* for some C).

The Cholesky factorization provides another particular example of square root, which should not be confused with the unique non-negative square root.

Unitary freedom of square roots

If T is a non-negative operator on a finite-dimensional Hilbert space, then all square roots of T are related by unitary transformations. More precisely, if T = A*A = B*B, then there exists a unitary U such that A = UB.

Indeed, take B = T1/2 to be the unique non-negative square root of T. If T is strictly positive, then B is invertible, and so U = AB−1 is unitary:

[math]\displaystyle{ \begin{align} U^*U &= \left(\left(B^*\right)^{-1}A^*\right)\left(AB^{-1}\right) = \left(B^*\right)^{-1}T \left(B^{-1}\right) \\ &= \left(B^*\right)^{-1} B^* B \left(B^{-1}\right) = I. \end{align} }[/math]

If T is non-negative without being strictly positive, then the inverse of B cannot be defined, but the Moore–Penrose pseudoinverse B+ can be. In that case, the operator B+A is a partial isometry, that is, a unitary operator from the range of T to itself. This can then be extended to a unitary operator U on the whole space by setting it equal to the identity on the kernel of T. More generally, this is true on an infinite-dimensional Hilbert space if, in addition, T has closed range. In general, if A, B are closed and densely defined operators on a Hilbert space H, and A* A = B* B, then A = UB where U is a partial isometry.

Some applications

Square roots, and the unitary freedom of square roots, have applications throughout functional analysis and linear algebra.

Polar decomposition

Main page: Polar decomposition

If A is an invertible operator on a finite-dimensional Hilbert space, then there is a unique unitary operator U and positive operator P such that

[math]\displaystyle{ A = UP; }[/math]

this is the polar decomposition of A. The positive operator P is the unique positive square root of the positive operator AA, and U is defined by U = AP−1.

If A is not invertible, then it still has a polar composition in which P is defined in the same way (and is unique). The unitary operator U is not unique. Rather it is possible to determine a "natural" unitary operator as follows: AP+ is a unitary operator from the range of A to itself, which can be extended by the identity on the kernel of A. The resulting unitary operator U then yields the polar decomposition of A.

Kraus operators

Main page: Choi's theorem on completely positive maps

By Choi's result, a linear map

[math]\displaystyle{ \Phi : C^{n \times n} \to C^{m \times m} }[/math]

is completely positive if and only if it is of the form

[math]\displaystyle{ \Phi(A) = \sum_i ^k V_i A V_i^* }[/math]

where knm. Let {Epq} ⊂ Cn × n be the n2 elementary matrix units. The positive matrix

[math]\displaystyle{ M_\Phi = \left(\Phi \left(E_{pq}\right)\right)_{pq} \in C^{nm \times nm} }[/math]

is called the Choi matrix of Φ. The Kraus operators correspond to the, not necessarily square, square roots of MΦ: For any square root B of MΦ, one can obtain a family of Kraus operators Vi by undoing the Vec operation to each column bi of B. Thus all sets of Kraus operators are related by partial isometries.

Mixed ensembles

Main page: Density matrix

In quantum physics, a density matrix for an n-level quantum system is an n × n complex matrix ρ that is positive semidefinite with trace 1. If ρ can be expressed as

[math]\displaystyle{ \rho = \sum_i p_i v_i v_i^* }[/math]

where [math]\displaystyle{ p_i \gt 0 }[/math] and Σ pi = 1, the set

[math]\displaystyle{ \left\{p_i, v_i\right\} }[/math]

is said to be an ensemble that describes the mixed state ρ. Notice {vi} is not required to be orthogonal. Different ensembles describing the state ρ are related by unitary operators, via the square roots of ρ. For instance, suppose

[math]\displaystyle{ \rho = \sum_j a_j a_j^*. }[/math]

The trace 1 condition means

[math]\displaystyle{ \sum_j a_j ^* a_j = 1. }[/math]

Let

[math]\displaystyle{ p_i = a_i ^* a_i, }[/math]

and vi be the normalized ai. We see that

[math]\displaystyle{ \left\{p_i, v_i\right\} }[/math]

gives the mixed state ρ.

See also

Notes

  1. 1.0 1.1 Higham, Nicholas J. (April 1986), "Newton's Method for the Matrix Square Root", Mathematics of Computation 46 (174): 537–549, doi:10.2307/2007992, http://www.ams.org/journals/mcom/1986-46-174/S0025-5718-1986-0829624-5/S0025-5718-1986-0829624-5.pdf 
  2. Mitchell, Douglas W. (November 2003). "Using Pythagorean triples to generate square roots of [math]\displaystyle{ I_2 }[/math]". The Mathematical Gazette 87 (510): 499–500. doi:10.1017/s0025557200173723. 
  3. 3.0 3.1 3.2 (Horn Johnson), p. 439, Theorem 7.2.6 with [math]\displaystyle{ k = 2 }[/math]
  4. Horn, Roger A.; Johnson, Charles R. (1990). Matrix analysis. Cambridge: Cambridge Univ. Press. p. 411. ISBN 9780521386326. 
  5. For analytic functions of matrices, see
  6. For the holomorphic functional calculus, see:
  7. Deadman, Edvin; Higham, Nicholas J.; Ralha, Rui (2013), "Blocked Schur Algorithms for Computing the Matrix Square Root", Applied Parallel and Scientific Computing (Springer Berlin Heidelberg): pp. 171–182, doi:10.1007/978-3-642-36803-5_12, ISBN 978-3-642-36802-8, http://eprints.maths.manchester.ac.uk/1951/1/paper16.pdf 
  8. Denman & Beavers 1976; Cheng et al. 2001
  9. Higham, Nicholas J. (1997). "Stable iterations for the matrix square root". Numerical Algorithms 15 (2): 227–242. doi:10.1023/A:1019150005407. Bibcode1997NuAlg..15..227H. 

References